<?php if($this->pageCount){
    $params = Zend_Controller_Front::getInstance()->getRequest()->getParams();
    unset($params['module']);
    unset($params['controller']);
    unset($params['action']);
?>
<div class="pagination">
    <!-- Previous page link -->
    <?php if(isset($this->previous)) {?>
    <a rel="<?php echo $this->previous;?>" class="prev" href="<?php echo $this->url(array_merge($params, array('page'=>$this->previous)));?>">&nbsp;</a>
    <?php }else{?>
    <span class="disable">«Prev</span>
    <?php }?>
    
    <!-- Numbered page link -->
    <?php foreach($this->pagesInRange as $page){?>
        <?php if($page != $this->current){?>
            <a rel="<?php echo $page;?>" href="<?php echo $this->url(array_merge($params, array('page'=>$page)))?>"><?php echo $page;?></a>
        <?php }else{?>
            <span><?php echo $page;?></span>
        <?php }?>
    <?php }?>
    
    <!-- Next page link -->
    <?php if(isset($this->next)){?>
        <a rel="<?php echo $this->next;?>" class="next" href="<?php echo $this->url(array_merge($params, array('page'=>$this->next)));?>">&nbsp;</a>
    <?php }else{?>
    <span class="disable">Next »</span>
    <?php }?>
</div>
<?php }?>